package com.julian.decoratorPattern;

public class StarbuzzCoffee {
    public static void main(String[] args) {
        Beverage beverage = new Espresso("tall");//小杯
        System.out.println("不加料" + beverage.getSize() + beverage.getDescription() + "$" + beverage.cost());

        //加双分摩卡，奶泡
//        beverage = new Mocha(beverage);
//        beverage = new Mocha(beverage);
//        beverage = new Whip(beverage);
//        beverage = new Soy(beverage);
        beverage = new Soy(new Whip(new Mocha(new Mocha(beverage))));

        System.out.println(beverage.getSize() + beverage.getDescription() + "$" + beverage.cost());

    }
}
